$OpenBSD: apm-patch-src_aapm_cc,v 1.4 2014/01/04 09:05:24 ajacoutot Exp $
--- src/aapm.cc.orig	Sun Nov 17 17:54:39 2013
+++ src/aapm.cc	Sat Jan  4 09:34:02 2014
@@ -38,7 +38,7 @@
 #include <dev/acpica/acpiio.h>
 #endif
 
-#ifdef __NetBSD__
+#if defined __NetBSD__ || defined __OpenBSD__
 #include <sys/file.h>
 #include <sys/ioctl.h>
 #include <sys/types.h>
@@ -73,7 +73,7 @@ static YColor *taskBarBg = 0;
 void YApm::ApmStr(char *s, bool Tool) {
 #if (defined(__FreeBSD__) || defined(__FreeBSD_kernel__)) && defined(i386)
     struct apm_info ai;
-#elif defined __NetBSD__
+#elif defined __NetBSD__ || defined __OpenBSD__
     struct apm_power_info ai;
 #else
     char buf[80];
@@ -114,7 +114,7 @@ void YApm::ApmStr(char *s, bool Tool) {
     BATlife = ai.ai_batt_life;
     BATtime = ai.ai_batt_time == 0 ? -1 : ai.ai_batt_time;
     strcpy(units, "sec");
-#elif defined __NetBSD__
+#elif defined __NetBSD__ || defined __OpenBSD__
     memset(&ai, 0, sizeof(ai));
     if (ioctl(fd, APM_IOC_GETPOWER, &ai) == -1)
     {
